The added resistors provide positive feedback to the opamp circuit, causing it to exhibit hysteresis.